package de.stefanocke.roo.kontaktliste.web.common;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.model.IModel;

/**
 * This event is fired when an entity is clicked / selected  (??)
 * @author stoc
 *
 * @param <T> the type of the entity
 */
public class NavigationEvent<T> {
	private IModel<T> model;
	private AjaxRequestTarget target;
	private String kind;
	
	/** The default navigation event kind: showing details for the selected entity. */
	public static final String DETAILS = "details";
	
	public NavigationEvent(String kind, IModel<T> model, AjaxRequestTarget target) {
		super();
		this.kind = kind;
		this.model = model;
		this.target = target;
	}
	
	public IModel<T> getModel() {
		return model;
	}
	
	public AjaxRequestTarget getTarget() {
		return target;
	}
	
	public String getKind() {
		return kind;
	}
	
}
